Skip to content

Conversation

mohd-akram
Copy link
Contributor

@mohd-akram mohd-akram commented Aug 5, 2020

This PR makes TRY_CATCH_CALL return on failure, and to enable proper cleanup, replaces usage of delete with smart pointers. It also fixes two sources of segmentation faults.

Fixes #1026, fixes #1323.

@mohd-akram mohd-akram mentioned this pull request Aug 6, 2020
@jjhbw
Copy link

jjhbw commented Aug 7, 2020

Seems to fix #1323

If the database was being closed, and non-exclusive work was scheduled,
it overrode the lock flag such that the state became open=false locked=false
instead of open=false locked=true. This caused queued work to not be
processed, leaking memory, which causes a segfault during napi cleanup.

Make the same changes to other methods for safe measure.
@kewde
Copy link
Collaborator

kewde commented Sep 6, 2020

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

segmentation fault / EXC_BAD_ACCESS / KERN_INVALID_ADDRESS when closing DB when a query is in progress Segmentation Fault
3 participants